//////////////////////////////////////////////////////////////////////////

#ifndef _IMAGES_H_
#define _IMAGES_H_

#include <string>

struct SDL_Surface;

class GUI_Images
{
//////////////////////////////////////////////////////////////////////////

public:

//////////////////////////////////////////////////////////////////////////

    GUI_Images(const std::string& _resourcesFolder, float _resizeFactor);
    ~GUI_Images();

    enum Image {
        Empty, Background,
        ButtonRed, ButtonRedHover, 
        ButtonGreen, ButtonGreenHover, 
        Edit, EditHover, 
        ButtonLeft, ButtonLeftHover, 
        ButtonRight, ButtonRightHover, 
        Checked, Unchecked, 
        GameWall, GameBullet, PlayerHighlight,
        HUDHeart, HUDBack, MenuBack,
        MapBackground, MapPreview,
        Player1, Player2, Player3, Player4, Player5, Player6,
        ImageCount
    };

    void Resize(float _resizeFactor);
    void ReloadMapImages(const std::string& _mapFolder);

    SDL_Surface *Get(GUI_Images::Image _imageName);

//////////////////////////////////////////////////////////////////////////

private:

//////////////////////////////////////////////////////////////////////////
    const int m_GUIResolution;
    const int m_MapResolution;
    const std::string m_ImagesSubfolder;
    const std::string m_MapsSubfolder;

    std::string m_CurrentMap;
    std::string m_ResourcesFolder;

    float m_ResizeFactor;
 
    void InitImages();
    void ReloadImage(GUI_Images::Image _image, const std::string& _fileName);
    void ReloadMapImage(GUI_Images::Image _image, const std::string& _fileName);
    void ReloadImage(GUI_Images::Image _image, const std::string& _fileName, float _width, float _height);

    SDL_Surface *m_Images[ImageCount];

//////////////////////////////////////////////////////////////////////////
};


//////////////////////////////////////////////////////////////////////////

#endif

//////////////////////////////////////////////////////////////////////////
